package decorator.source;

/**
 * @Author: Chen Guang
 * @Date: 2019/3/29 0029 上午 10:33
 */
public class Test {
    public static void main(String[] args) {
        ConcreteCompoent c = new ConcreteCompoent();
        ConcreteDecoratorA a = new ConcreteDecoratorA();
        ConcreteDecoratorB b = new ConcreteDecoratorB();

        a.setCompoent(c);
        a.operation();

        System.out.println("------");

        b.setCompoent(a);
        b.operation();
    }
}
